
package com.mephi.interfaces;
 

import com.mephi.exception.IllegalGameStateException;
import com.mephi.model.Move;
import com.mephi.model.PieceMovement;
import com.mephi.util.PieceColor;


/**
 * Interface for searching for pieces movements in the chessboard.
 * 
 * @author mephisto
 * 2011-06-23
 */
public interface PieceMoveFinder
{
	/**
	 * 
	 * @param moveNumber the number of move to set
	 * @param pieceColor the PieceColor to set
	 * @return the long notation of chess move
	 * 
	 * @throws IllegalGameStateException if game is illegal state
	 * (calculating long algebraic move is not possible)
	 */
	PieceMovement find(int moveNumber, PieceColor pieceColor) throws IllegalGameStateException;
	
	/**
	 * 
	 * @return the gameModel
	 */
	public Game<Move> getGameModel();

	/**
	 * 
	 * @param gameModel to the gameModel to set
	 * @throws IllegalArgumentException if gameModel is null
	 */
	public void setGameModel(Game<Move> gameModel);

	/**
	 * 
	 * @return the chessboard
	 */
	public Chessboard getChessboard();

	/**
	 * 
	 * @param chessboard to the chessboard to set
	 * @throws IllegalArgument Exception if chessboard is null 
	 * @throws map which describes all fields doesn't have exactly
	 * 		   64 keys used for chess notation
	 */
	public void setChessboard(Chessboard chessboard);
}
